package hku.cs.lunuo.cfg;

public class EntityStmt implements Comparable{
	String klassName;
	int i;
	
	@Override
	public boolean equals(Object obj) {
		EntityStmt e = (EntityStmt)obj;
		if(klassName.equals(e.klassName)&&i==e.i)
			return true;
		else
			return false;
	}

	public EntityStmt(String klassName, int i) {
		super();
		this.klassName = klassName;
		this.i = i;
	}

	@Override
	public int compareTo(Object o) {
		EntityStmt e = (EntityStmt)o;
		int tmp = this.klassName.compareTo(e.klassName);
		if(tmp == 0) {
			return this.i-e.i;
		}else
			return tmp;
	}
	
	
}